package cn.lopr.hfbdqn.dao;

import cn.lopr.hfbdqn.pojo.Comment;
import cn.lopr.hfbdqn.vo.CommentVo;
import cn.lopr.mvc.frame.annotaion.Repository;

import java.util.List;

@Repository
public interface CommentMapper {
    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<Integer> selectMovieIdByCommentNum();

    List<Integer> selectMovieIdByCommentNumAndPage();

    List<Comment> selectByMovieId(Integer movieId);

    List<CommentVo> selectCommentByMovieId(Integer movieId);

    List<CommentVo> selectByMovieIdLimit6(Integer movieId);

    float selectAvgScoreByMovieId(Integer movieId);

}